<% content_for :css do %>
  <%= stylesheet_link_tag 'new_or_edit','tool_logos_new' %>
<% end %>
<div id='new_tool_logo'>
  <div class='left'>
    <div class='logo'>
      <%= tool_logo_image_tag @tool, :width => 200 %>
    </div>
    <div class='other'>
      <%= link_to "✄直接裁剪该图标", edit_tool_logo_url(@tool.logo) if @tool.logo %>
    </div>
  </div>
  <div class='right new_or_edit'>
    <div class='tool_name'>
      <%= @tool.name %>
    </div>
    <div class='form'>      
    <% form_for @logo,
         :html => {
          :id => :new_tool_logo_form,
          :multipart => true
         } do |f| %>
      <dl>
        <dt>新图标：</dt>
        <dd><%= f.file_field :image_file %></dd>
      </dl>
    <%= f.hidden_field :tool_id %>
    <% end %>      
    </div>
    <div class='buttons'>
      <%= link_to_function "上传新图标", "$('new_tool_logo_form').submit()", :class => :submit %>
      <%= link_to '返回', tool_url(@tool), :class => :return %>
    </div>  
  </div>
</div>  